export default {
    namespaced:true,
    actions:{
        incrementIfOdd(context, value) {
            if (context.state.sum % 2) {
                context.commit("JIA", value);
            }
        },
        incrementWait(context, value) {
            setTimeout(() => {
                context.commit("JIA", value);
            }, 300);
        },
    },
    mutations : {
        JIA(state,value){
            state.sum+=value
        },
        JIAN(state,value){
            state.sum-=value
        } 
    },
    getters :{
        bigSum(state){
            return state.sum*10
        }
    },
    state : {
        sum: 0,
        school:"hhhh",
        sex:"男",
        age:18,
        
    }
}